<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CDBProvider_SAE
 *
 * @author wanghao
 */
class CDBProvider_SAE extends _DBProvider {

    protected $db = null;

    public function __construct() {
        $this->db = new SaeMysql;
    }

    public function insert_id() {
        return $this->db->lastId();
    }

    public function affected_rows() {
        return 0;
    }

    public function mysql_error() {
        return $this->db->error();
    }

    /** 执行sql语句
     *
     * @param <string> $sql 要执行的sql
     * @return <type> 数据库执行结果
     */
    protected function runSql($sql) {
        $rtn = $this->db->runSql($sql);
        return $rtn;
    }

    public function __destruct() {
        $this->db->closeDb();
    }

}

?>
